package cn.itcast.batch.task;


import cn.itcast.batch.AnalysisDataRate;
import cn.itcast.batch.utils.DateUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

//按天计算准确率
public class TotalDayRateTask {
    private static final Logger logger = LoggerFactory.getLogger(TotalDayRateTask.class);

    public static void main(String[] args) {
        /**
         * 1.获取昨天日期
         * 2.实例化AnalysisDataRate对象
         * 3.运行任务
         */
        String day = DateUtil.getTodayDate();
        AnalysisDataRate dataRate = new AnalysisDataRate(day);
        logger.info("按照天计算数据准确率："+day);
        long time = System.currentTimeMillis();
        dataRate.executeTask();
        logger.info("TotalDayRateTask 作业运行结束,运行话费时间："+(System.currentTimeMillis()-time)+"毫秒");
    }
}
